export const AttackAudio = document.getElementById('attack')! as HTMLAudioElement;
export const MoveAudio = document.getElementById('move')! as HTMLAudioElement;
export const TankCrackAudio = document.getElementById('tankCrack')! as HTMLAudioElement;
export const MainCanvas = document.getElementById('canvas')! as HTMLCanvasElement;
MoveAudio.loop = true

// MoveAudio.play()

export function loadImage(src: string): Promise<HTMLImageElement> {
    return new Promise((resolve) => {
        const img = new Image();
        img.src = src
        img.onload = () => resolve(img)
    })
}

export const TankImage = await loadImage("/images/tank.png")
export const tankPosition = [0, 0, 25, 25]